home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 October / EnigmA AMIGA RUN 01 (1995)(G.R. Edizioni)(IT)[!][issue 1995-10][Aminet 7].iso / Aminet / dev / gui / BGUI11c.lha / ARexxClass / ARexxClass.h < prev    next >
C/C++ Source or Header  |  1995-04-30  |  3KB  |  110 lines

  1. #ifndef AREXXCLASS_H
  2. #define AREXXCLASS_H
  3. /*
  4. **      $VER: ARexxClass.h 1.0 (22.7.94)
  5. **      C Header for the BOOPSI ARexx interface class.
  6. **
  7. **      (C) Copyright 1994-1995 Jaba Development.
  8. **      (C) Copyright 1994-1995 Jan van den Baard.
  9. **/
  10.  
  11. #ifndef EXEC_TYPES_H
  12. #include <exec/types.h>
  13. #endif
  14.  
  15. #ifndef EXEC_MEMORY_H
  16. #include <exec/memory.h>
  17. #endif
  18.  
  19. #ifndef DOS_DOS_H
  20. #include <dos/dos.h>
  21. #endif
  22.  
  23. #ifndef DOS_RDARGS_H
  24. #include <dos/rdargs.h>
  25. #endif
  26.  
  27. #ifndef REXX_STORAGE_H
  28. #include <rexx/storage.h>
  29. #endif
  30.  
  31. #ifndef REXX_RXSLIB_H
  32. #include <rexx/rxslib.h>
  33. #endif
  34.  
  35. #ifndef REXX_ERRORS_H
  36. #include <rexx/errors.h>
  37. #endif
  38.  
  39. #ifndef INTUITION_CLASSES_H
  40. #include <intuition/classes.h>
  41. #endif
  42.  
  43. #ifndef INTUITION_CLASSUSR_H
  44. #include <intuition/classusr.h>
  45. #endif
  46.  
  47. /* Tags */
  48. #define AC_TB                           (TAG_USER+0x30000)
  49.  
  50. #define AC_HostName                     (AC_TB+1)       /* I-G-- */
  51. #define AC_FileExtention                (AC_TB+2)       /* I---- */
  52. #define AC_CommandList                  (AC_TB+3)       /* I---- */
  53. #define AC_ErrorCode                    (AC_TB+4)       /* I---- */
  54. #define AC_RexxPortMask                 (AC_TB+5)       /* --G-- */
  55.  
  56. /* Methods */
  57. #define AC_MB                           (0x3000)
  58.  
  59. /* ARexx class event-handler. */
  60. #define ACM_HANDLE_EVENT                (AC_MB+1)
  61.  
  62. /* Execute a host command. */
  63. #define ACM_EXECUTE                     (AC_MB+2)
  64.  
  65. struct acmExecute {
  66.         ULONG                   MethodID;
  67.         UBYTE                  *acme_CommandString;
  68.         LONG                   *acme_RC;
  69.         LONG                   *acme_RC2;
  70.         UBYTE                 **acme_Result;
  71.         BPTR                    acme_IO;
  72. };
  73.  
  74. /*
  75. **      The routines from the command-list will receive a pointer
  76. **      to this structure. In this structure are the parsed arguments
  77. **      and storage to put the results of the command.
  78. **/
  79. typedef struct {
  80.         ULONG                   *ra_ArgList;      /* Result of ReadArgs(). */
  81.         LONG                     ra_RC;           /* Primary result. */
  82.         LONG                     ra_RC2;          /* Secundary result. */
  83.         UBYTE                   *ra_Result;       /* RESULT variable. */
  84. } REXXARGS;
  85.  
  86. /*
  87. **      An array of these structures must be passed at object-create time.
  88. **/
  89. typedef struct {
  90.         UBYTE                   *rc_Name;         /* Command name. */
  91.         UBYTE                   *rc_ArgTemplate;  /* DOS-style argument template. */
  92.         VOID                   (*rc_Func)( REXXARGS *, struct RexxMsg * );
  93. } REXXCOMMAND;
  94.  
  95. /*
  96. **      Possible errors.
  97. **/
  98. #define RXERR_NO_COMMAND_LIST           (1L)
  99. #define RXERR_NO_PORT_NAME              (2L)
  100. #define RXERR_PORT_ALREADY_EXISTS       (3L)
  101. #define RXERR_OUT_OF_MEMORY             (4L)
  102.  
  103. /*
  104. **      Class routine protos.
  105. **/
  106. Class *InitARexxClass( void );
  107. BOOL FreeARexxClass( Class * );
  108.  
  109. #endif
  110.